package cate.common.table.item.spice.row;

import cate.common.table.EExcelNoteField;
import cate.common.table.EExcelRowClass;
import cate.common.table.ERow;
import cate.common.table.item.rune.SkillGroupList;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.StringUtils;

@EExcelRowClass(IDTitle = "索引")
public class SpiceCallBaseRow extends ERow {
    @EExcelNoteField(fieldName = "成功率")
    protected int percent;

    @EExcelNoteField(fieldName = "占星花费")
    public String consumeStr;

    @EExcelNoteField(fieldName = "开运花费")
    public String vipConsumeStr;

    @EExcelNoteField(fieldName = "星组概率")
    protected String starGroupStr;

    @JsonIgnore
    public SkillGroupList starGroupList;

    public double successPercent;

    @Override
    public void decode() {
        starGroupList = new SkillGroupList();
        if (StringUtils.isNotBlank(starGroupStr)) {
            starGroupList.parse(starGroupStr);
        }
        successPercent = percent / 10000d;
    }
}
